package day006.homework;

import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入随机数组长度:");
        int n = sc.nextInt();
        int[] arr = new int[n];
        System.out.println("请输入随机元素数组范围：");
        int min = sc.nextInt();
        int max = sc.nextInt();
        Random rand = new Random();
        for (int i = 0; i < n; i++) {
            arr[i] = rand.nextInt(min, max + 1);
        }
        System.out.println("随机数组为：");
        System.out.println(Arrays.toString(arr));
    }
}
